#ifndef _MDATA_H_
#define _MDATA_H_

#include "mdev.h"

typedef struct {
	uint32_t count0Start;
	uint32_t count1Start;
	uint32_t countEnd;
	const uint32_t *count0Addr;
	const uint32_t *count1Addr;
	uint32_t count;
} MDataCounter_t;

void mDataTest(void);
void mDataInit(void);
MDevBool_e mDataIsPowerUp(void);

MDevStat_e mDataCounterInit(MDataCounter_t *counter, uint32_t start0,  uint32_t start1, uint32_t end);
MDevStat_e mDataCounterClear(MDataCounter_t *counter);
uint32_t mDataCounterGetValue(const MDataCounter_t *counter);
MDevStat_e mDataCounterSetValue(MDataCounter_t *counter, uint32_t value);
MDevStat_e mDataCounterAddValue(MDataCounter_t *counter, uint32_t value);
MDevStat_e mDataCounterAddOne(MDataCounter_t *counter);


#endif /* _MDATA_H_ */
